<template>
	<view class="">
		
	
	<view class="student_user">
		<image class="ph" src="../../static/ico_head.png" mode="aspectFill"></image>
		<view class="name">
			王瑞琛
		</view>
	</view>

	<view class="rate">
		<view class="name">
			作业评价
		</view>
		<uv-rate :count="count" v-model="value" inactiveColor="#D8D8D8" activeColor="#FF8535" size="46rpx" gutter="10" inactiveIcon="star-fill"></uv-rate>
	</view>
	
	<view class="photos">
		<image class="ph" src="../../static/ph_1.png" mode="widthFix"></image>
	</view>
	
	<view class="content">
		<uv-textarea v-model="textarea" border="none" height="240rpx" :textStyle="{fontSize: '28rpx'}" placeholder="作业评语" style="padding:0"></uv-textarea>
	</view>
	
	<view class="footer_btn" v-if="workType == 0">
		<view class="btn_org2">
			确定
		</view>
	</view>
	
	<view class="footer_btn" v-if="workType == 1">
		<view class="btn_white">
			修改
		</view>
		<view class="btn_org">
			确定
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				workType: 0, //0:评价，1:查看/修改
				count: 5,
				value: 0,
				readonly: false,
				textarea: ''
			}
		},
		onLoad(opt) {
			//console.log(opt)
			if(opt){
				this.workType = opt.worktype
			}
			if(this.workType == 0){
				this.value = 0
			}
			if(this.workType == 1){
				this.value = 4
			}
			
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
.content{
	background: #fff;
	margin-top: 20rpx;
	padding:30rpx 40rpx;
}
.photos{
	margin-top: 20rpx;
	background: #fff;
	padding:20rpx;
	.ph{
		width: 100%;
	}
}
.rate{
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100rpx;
	background: #fff;
	padding:0 40rpx;
	border-bottom: 1px solid rgba(230, 229, 231, 0.8);
}
.student_user{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding:40rpx 40rpx 20rpx;
	background: #fff;
	.name{
		width: 100%;
		font-size: 28rpx;
		font-weight: 500;
		line-height: 38rpx;
	}
	.ph{
		flex-shrink: 0;
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
		display: block;
		font-size: 0;
		margin-right: 20rpx;
	}
}
.footer_btn{
	position: fixed;
	left:0;
	bottom: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding:40rpx;
	.btn_white{
		width: 320rpx;
		height: 84rpx;
		line-height: 84rpx;
		text-align: center;
		background: #FFFFFF;
		box-sizing: border-box;
		border: 2rpx solid #FF8535;
		font-size: 28rpx;
		color: #FF8535;
		border-radius: 8rpx;
	}
	.btn_org{
		width: 320rpx;
		height: 84rpx;
		line-height: 84rpx;
		text-align: center;
		background: #FF8535;
		color:#fff;
		font-size: 28rpx;
		border-radius: 8rpx;
	}
	.btn_org2{
		width: 100%;
		height: 84rpx;
		line-height: 84rpx;
		text-align: center;
		background: #FF8535;
		color:#fff;
		font-size: 28rpx;
		border-radius: 8rpx;
	}
}
</style>
